import request from "@/utils/request";
import { downloadOfGet } from "@/utils/request";

export const getTreeByExcel = (data) => {
  return request({
    url: "/eisIndicatorSystemNode/getTreeByExcel",
    method: "post",
    data,
  });
};
//装备列表-新增用户装备列表表头要展示的字段

export const addEquipTitle = (data) => {
  return request({
    url: "/engineering/equip/title/add",
    method: "post",
    data,
  });
};

export const addSystem = (data) => {
  return request({
    url: "/eisIndicatorSystem/add",
    method: "post",
    data,
  });
};

export const editSystem = (data) => {
  return request({
    url: "/eisIndicatorSystem/edit",
    method: "post",
    data,
  });
};

export const deleteSystem = (params) => {
  return request({
    url: "/eisIndicatorSystem/delete",
    method: "delete",
    params,
  });
};

export const queryNewById = (params) => {
  return request({
    url: "/eisIndicatorSystem/queryNewById",
    method: "get",
    params,
  });
};
export const queryById = (params) => {
  return request({
    url: "/eisIndicatorSystem/queryById",
    method: "get",
    params,
  });
};

export const getHistoryList = (params) => {
  return request({
    url: "/eisIndicatorSystem/list",
    method: "get",
    params,
  });
};

export const downloadTemp = () => {
  return downloadOfGet("/eisIndicatorSystemNode/downloadTemp", "指标体系模板.xlsx");
};
